<template>
  <div>
    <h2>禁用选项</h2>
    <p>使用 disabled 字段禁用选项。</p>
    <el-tree-select v-model="value" :data="data" />
  </div>
</template>

<script>

export default {
  name: 'TreeSelectDisabled',
  data() {
    return {
      value: '',
      data: [
        {
          value: '1',
          label: 'Level one 1',
          disabled: true,
          children: [
            {
              value: '1-1',
              label: 'Level two 1-1',
              disabled: true,
              children: [
                {
                  disabled: true,
                  value: '1-1-1',
                  label: 'Level three 1-1-1',
                },
              ],
            },
          ],
        },
        {
          value: '2',
          label: 'Level one 2',
          children: [
            {
              value: '2-1',
              label: 'Level two 2-1',
              children: [
                {
                  value: '2-1-1',
                  label: 'Level three 2-1-1',
                },
              ],
            },
            {
              value: '2-2',
              label: 'Level two 2-2',
              children: [
                {
                  value: '2-2-1',
                  label: 'Level three 2-2-1',
                },
              ],
            },
          ],
        },
        {
          value: '3',
          label: 'Level one 3',
          children: [
            {
              value: '3-1',
              label: 'Level two 3-1',
              children: [
                {
                  value: '3-1-1',
                  label: 'Level three 3-1-1',
                },
              ],
            },
            {
              value: '3-2',
              label: 'Level two 3-2',
              children: [
                {
                  value: '3-2-1',
                  label: 'Level three 3-2-1',
                },
              ],
            },
          ],
        },
      ]
    }
  },
  methods: {

  },
}
</script>